package com.aerozhonghuan.logisticsmall.modules.common.logic;

import android.content.Context;

import com.aerozhonghuan.logisticsmall.framework.base.URLs;
import com.aerozhonghuan.foundation.log.LogUtil;
import com.aerozhonghuan.oknet2.CommonCallback;
import com.aerozhonghuan.oknet2.CommonMessage;
import com.aerozhonghuan.oknet2.RequestBuilder;

/**
 * Created by zhangyonghui on 2018/4/20.
 */

public class CommonWebRequest {
    public static final String OPTYPE_ANALYSIS = "1";
    public static final String OPTYPE_RECOMMEND = "2";
    private static final String TAG = "CommonWebRequest";
    private static final String DIST_ID = "1";

    public static void burypoint(Context context, String opType) {
        String url = URLs.BURYPOINT_URL;
        RequestBuilder.with(context).URL(url)
                .para("distId", DIST_ID)
                .para("opType", opType)
                .onSuccess(new CommonCallback() {
                    @Override
                    public void onSuccess(Object messsageBodyObject, CommonMessage commonMessage, String allResponseString) {
                        LogUtil.d(TAG, allResponseString);
                    }
                }).excute();
    }
}
